home *** CD-ROM | disk | FTP | other *** search
- Path: niktow.canisius.edu!gort!duchan
- From: duchan@gort.canisius.edu (Alan Duchan)
- Newsgroups: comp.lang.c++
- Subject: Re: Turbo C++ won't write 0Ah to file!?!?
- Date: 1 Apr 1996 19:21:35 GMT
- Organization: Canisius College, Buffalo, NY 14208
- Message-ID: <4jpabv$9e8@niktow.canisius.edu>
- References: <4jnpcg$nis@tribune.concentric.net>
- NNTP-Posting-Host: gort.canisius.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- mikolaj@concentric.com wrote:
- : Turbo C++ 3.0 won't write character 0Ah to a file, instead it writes 0Dh.
- : What's the problem? Is this a bug?
-
- My guess is that your program is actually writing 0Dh followed by
- 0Ah--that is, convert a LF to a CR/LF. This is what Borland and most
- (all?) MS-DOS based compilers do with a file opened in "text" mode. To
- write without any conversions, open the file in "binary" mode.
-
- Hope this helps, Alan Duchan
-